Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev: build HTML from src/oas.md #4254

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open

Conversation

ralfhandl
Copy link
Contributor

@ralfhandl ralfhandl commented Dec 16, 2024

  • new npm script npm run build-src to build HTML from file file src/oas.md
  • produce deploy-preview/oas.html
  • git-ignore folder deploy-preview
  • updateCONTRIBUTING.md from main: dev: update from main #4271
  • describe build scripts in CONTRIBUTING.md

Part of

@ralfhandl ralfhandl requested review from a team as code owners December 16, 2024 10:12
@ralfhandl ralfhandl added Housekeeping script Pull requests that update Bash or JavaScript code labels Dec 16, 2024
@ralfhandl ralfhandl requested a review from handrews December 16, 2024 10:13
@ralfhandl ralfhandl linked an issue Dec 16, 2024 that may be closed by this pull request
5 tasks
@handrews
Copy link
Member

I tried this out and it works as advertised- thanks!

One question: Could we put src-preview/ under deploy/? Or maybe have a deploy-dev/? I kind of like keeping the build artifacts together, or at least following the same sort of naming. But this isn't something I'd insist on, just a preference.

@ralfhandl
Copy link
Contributor Author

We can put oas.html wherever you like, I just thought it is easier to find next to src/, and we could also build the JSON Schema files from src/schemas/validation/ into it.

@lornajane
Copy link
Contributor

We agreed to name the output directory deploy-preview (the main build script outputs to deploy/. Also this pull request needs some usage documentation in the CONTRIBUTING file so we can remember what we built and how to use it.

cd scripts/md2html

filename=src/oas.md
tempfile=../../deploy/oas/oas.html
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems odd to me that we're putting a tempfile under /deploy when our output is under /deploy-preview. Should we not have the tempfile there and named something obvious (eg. with tmp or temp in the name?) so that if something breaks the mess is left in the same place we were expecting output? And we can have an npm run clean-src that just deletes that directory so that it works whether the build was successful or not? (I don't care if you add clean-src in this PR or not, I'm just thinking it might be nice at some point).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Housekeeping script Pull requests that update Bash or JavaScript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create dev build infrastructure
3 participants